import 'package:pacsun/model/taskModel.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

class TaskListModel {
  final Map<int, CategoryData> categoryData;
  int tabCurrent;
  String aid;

  TaskListModel({
    List<TaskModal>? taskList,
    List<TaskModal>? myTaskList,
    required this.tabCurrent,
    required this.categoryData,
    required this.aid,
  });
}

// 分类数据模型
class CategoryData {
  List<TaskModal> list;
  List<TaskModal> filterList;
  int pageNum;
  bool hasMore;
  String tagValue;
  String taskType;
  Map<String, String> types;
  RefreshController refreshController;

  CategoryData({
    this.tagValue = 'All',
    required this.list,
    required this.filterList,
    required this.pageNum,
    required this.hasMore,
    required this.taskType,
    required this.refreshController,
    required this.types,
  });

  Map<String, dynamic> toJson() {
    return {
      'List': list,
      'pageNum': pageNum,
      'hasMore': hasMore,
      'tagValue': tagValue,
      'types': types.toString()
    };
  }
}
